PageNumber

Basic and Crystal syntax.

Returns

Whole Number

Action

PageNumber inserts the current page number as a field in a formula.

Typical uses

Use this function any time you want to determine the page number, at print time, and use that number in calculating formula results. For example, you can use this function when you want to print something on certain pages and not on others.

Examples

The following examples are applicable to Crystal syntax:

PageNumber

Creates a field containing the current page number that you can place anywhere on the page. Using this formula is the equivalent of using the Page Number field in the Special Fields folder in the Field Explorer.

If PageNumber > 1 Then

    PageNumber

Else

    0

Creates a field that prints the page number on every page but the first. By activating the Suppress if Zero check box on the Number tab of the Custom Style dialog box in the Format Editor, the formula will print nothing on the first page instead of a zero.

Note:    



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com